
var $ = require('jquery');
var util = require('imutil');

var tpl = require('../tpl');
var i18n = require('../i18n');
var servant = require('../i18n/servant');
var bus = require('bus');
var config = require('../webim.config');

var defaults = {
    el: null
};

var ProdLink = function(config){
    this.config = util.extend({}, defaults, config);
    this.elems = {};
    this.__init();
};

ProdLink.prototype = {
    __init: function(){
        this.elems.$el = $(this.config.el);
        //this.elems.$enter = $(this.config.tmpl);

        this.config.tmpl = tpl.chat2.prodlink({
            product: this.config.product,
            nophoto: config.nophoto
        });

        this.elems.$el.append(this.config.tmpl);
    }
};

module.exports = ProdLink;